package com.shengqin.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shengqin.common.pojo.CommonPage;
import com.shengqin.common.pojo.CommonResult;
import com.shengqin.entity.Reservation;
import com.shengqin.service.IReservationService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("admin/v1/plan/reservation")
public class PlanReservationController {

    @Resource
    private IReservationService reservationService;

    @PostMapping("queryPage")
    public CommonResult<Page<Reservation>> getPage(@RequestBody CommonPage<Reservation> commonPage){
        return CommonResult.data(reservationService.getPage(commonPage));
    }

}
